//
//  SDPersonInfoModel.m
//  SuperDoctor
//
//  Created by fdq on 16/7/7.
//  Copyright © 2016年 SD. All rights reserved.
//

#import "SDPersonInfoModel.h"

@implementation SDPersonInfoModel

- (instancetype)initWithDict:(NSDictionary *)dict{
	
	if (self = [super init]) {
		
		[self setValuesForKeysWithDictionary:dict];
	}
	return self;
}

+ (instancetype)modelWithDict:(NSDictionary *)dict{
	
	return [[self alloc] initWithDict:dict];
}

- (void)setValue:(id)value forUndefinedKey:(NSString *)key{
	
}
//归档
- (void)encodeWithCoder:(NSCoder *)aCoder{

	[aCoder encodeObject:self.name forKey:@"name"];
	
	[aCoder encodeObject:self.hospital forKey:@"hospital"];

	[aCoder encodeObject:self.department forKey:@"department"];

	[aCoder encodeObject:self.information forKey:@"information"];

	[aCoder encodeObject:self.image forKey:@"image"];

	[aCoder encodeObject:self.position forKey:@"position"];

	[aCoder encodeObject:self.describtion forKey:@"describtion"];

	
}

//解档
- (instancetype)initWithCoder:(NSCoder *)aDecoder{
	
	if (self = [super init]) {
		
		self.name = [aDecoder decodeObjectForKey:@"name"];
		
		self.hospital = [aDecoder decodeObjectForKey:@"hospital"];

		self.department = [aDecoder decodeObjectForKey:@"department"];

		self.information = [aDecoder decodeObjectForKey:@"information"];

		self.image = [aDecoder decodeObjectForKey:@"image"];

		self.position = [aDecoder decodeObjectForKey:@"position"];

		self.describtion = [aDecoder decodeObjectForKey:@"describtion"];

	}
	
	
	return self;
}
@end
